package com.jt.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jt.pojo.Result;
import com.jt.pojo.Role;
import com.jt.pojo.User;
import com.jt.pojo.UserRole;
import com.jt.vo.MenuAndRolesVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper  extends BaseMapper<User> {
    List<MenuAndRolesVo> getRoleList(String id);

    List<User> getList();

    List<String> selectBeforeRolesByUserId(String id);

    boolean saveRolesByUserId(@Param("userRoleList") List<UserRole> userRoleList);

    boolean removeBeforeRolesByUserId(String id);

    boolean deleteRoleIdByUserId(String userId, String roleId);

    int insertDept(String id,String userId, String deptId);

    List<Role> getRoles(String id);
}
